﻿//PlazaRejectedOrdersDerivativeColumns.cs
//Copyright (c) 2013 StockSharp LLC, all rights reserved.
//This code module is part of StockSharp library.
//This code is licensed under the GNU GENERAL PUBLIC LICENSE Version 3.
//See the file License.txt for the license details.
//More info on: http://stocksharp.com

namespace StockSharp.Plaza.Metadata
{
	using System;

	/// <summary>
	/// Колонки таблицы, содержащей отвергнутые в клиринг заявки.
	/// </summary>
	public abstract class PlazaRejectedOrdersDerivativeColumns : PlazaColumns
	{
		internal PlazaRejectedOrdersDerivativeColumns(string tableId)
			: base(tableId)
		{
			OrderId = new PlazaColumn(TableId, "id_ord", typeof(long));
			SessionId = new PlazaColumn(TableId, "sess_id", typeof(int));
			ClientCode = new PlazaColumn(TableId, "client_code", "c7");
			Moment = new PlazaColumn(TableId, "moment", typeof(DateTime));
			RejectMoment = new PlazaColumn(TableId, "moment_reject", typeof(DateTime));
			IsinId = new PlazaColumn(TableId, "isin_id", typeof(int));
			Direction = new PlazaColumn(TableId, "dir", typeof(bool));
			Amount = new PlazaColumn(TableId, "amount", typeof(int));
			Price = new PlazaColumn(TableId, "price", "d16.5");
			ExpirationDate = new PlazaColumn(TableId, "date_exp", typeof(DateTime));
			FirstOrderId = new PlazaColumn(TableId, "id_ord1", typeof(long));
			ReturnCode = new PlazaColumn(TableId, "ret_code", typeof(int));
			ReturnMessage = new PlazaColumn(TableId, "ret_message", "c255");
			Comment = new PlazaColumn(TableId, "comment", "c20");
			LoginFrom = new PlazaColumn(TableId, "login_from", "c20");
			ExtId = new PlazaColumn(TableId, "ext_id", typeof(int));
		}

		/// <summary>
		/// Номер заявки.
		/// </summary>
		public readonly PlazaColumn OrderId;

		/// <summary>
		/// Идентификатор торговой сессии.
		/// </summary>
		public readonly PlazaColumn SessionId;

		/// <summary>
		/// Код клиента.
		/// </summary>
		public readonly PlazaColumn ClientCode;

		/// <summary>
		/// Время изменения состояния заявки.
		/// </summary>
		public readonly PlazaColumn Moment;

		/// <summary>
		/// Время, когда заявка была отвергнута.
		/// </summary>
		public readonly PlazaColumn RejectMoment;

		/// <summary>
		/// Уникальный числовой идентификатор инструмента.
		/// </summary>
		public readonly PlazaColumn IsinId;

		/// <summary>
		/// Направление.
		/// </summary>
		public readonly PlazaColumn Direction;

		/// <summary>
		/// Количество в операции.
		/// </summary>
		public readonly PlazaColumn Amount;

		/// <summary>
		/// Цена.
		/// </summary>
		public readonly PlazaColumn Price;

		/// <summary>
		/// Дата истечения заявки.
		/// </summary>
		public readonly PlazaColumn ExpirationDate;

		/// <summary>
		/// Номер первой заявки.
		/// </summary>
		public readonly PlazaColumn FirstOrderId;

		/// <summary>
		/// Код возврата процедуры перепостановки.
		/// </summary>
		public readonly PlazaColumn ReturnCode;

		/// <summary>
		/// Текст сообщения о причине отвержения заявки при перепостановке.
		/// </summary>
		public readonly PlazaColumn ReturnMessage;

		/// <summary>
		/// Комментарий трейдера.
		/// </summary>
		public readonly PlazaColumn Comment;

		/// <summary>
		/// Логин пользователя, поставившего заявку.
		/// </summary>
		public readonly PlazaColumn LoginFrom;

		/// <summary>
		/// Внешний номер.
		/// </summary>
		public readonly PlazaColumn ExtId;
	}
}